Figure 36. Icons for Navigating to Other Inspectors
To display the Advanced Entity Inspector, select the Advanced Entity Inspector icon at the top of the Entity Inspector.
Figure 37. Advanced Entity Inspector
The Batch Faulting Size field lets you set the number of EOFaults that should be triggered when you first access an object of this type. By default, only one object is fetched from the database when you trigger an EOFault. By providing a number N in this field, you specify that N other EOFaults of the same entity should be fetched from the database along with the first one. This improves performance by minimizing round trips to the database server. For more information, see the chapter "Answers to Common Design Questions" in the book Enterprise Objects Framework Developer's Guide.
The External Query field allows you to specify any SQL statement that will be executed as is (that is, you can't perform any substitutions) when EOF does an unqualified fetch. On Sybase this can be a stored procedure. The columns selected by this SQL statement must be in alphabetical order by internal name, and must match in number and type with the class properties specified for the entity.
This field is used to specify a restricting qualifier. A restricting qualifier maps an entity to a subset of rows in a table. Restricting qualifiers are commonly used when you're using single table inheritance mapping, in which the data for a class and its subclasses is all stored in a single table. When you add a restricting qualifier to an entity, it causes a fetch for that entity to only retrieve objects of the appropriate type. For example, the Rentals sample database has a MOVIE_MEDIA table that includes rows for both the VideoTape and LaserDisk entities. VideoTape has the restricting qualifier (media = `T'), and LaserDisk has the restricting qualifier (media = `D'). When you fetch objects for the entity VideoTape, only rows that have the value `T' for the attribute media are fetched. For more discussion of single table and other types of inheritance mapping, see the chapter "Advanced Enterprise Object Modeling" in the book Enterprise Objects Framework Developer's Guide.
You use this field to specify a parent entity for the current entity. This field is used to model inheritance relationships. For example, in the Rentals database, the Customer entity is the parent of the Member and Guest entities (since Members and Guests are types of Customers). For more information, see the chapter "Advanced Enterprise Object Modeling" in the book Enterprise Objects Framework Developer's Guide.
The Read Only checkbox indicates whether the data that's represented by the entity can be altered by your application.
The Cache In Memory checkbox lets you specify that the objects associated with an entity should be cached in memory for quick access. Caching an entity's objects allows Enterprise Objects Framework to evaluate queries in memory, thereby avoiding round trips to the database. This is most useful for read-only entities, where there is no danger of the cached data getting out of sync with database data. This technique should only be used with small tables, since it fetches the entire table into memory.
The Abstract checkbox indicates whether the entity is abstract. An abstract entity is one for which no objects are ever instantiated in your application. For example, in the Rentals database, the Customer entity is abstract since Customer objects are never instantiated (though objects of its sub-entities, Member and Guest, are). Like the Parent field, this option is used to model inheritance. For more information, see the chapter "Advanced Enterprise Object Modeling" in the book Enterprise Objects Framework Developer's Guide.
Creating stored procedures and assigning them to entities is described in detail in the chapter Working with Stored Procedures.
Table of Contents
Next Section